package com.hashbee.user.dao;

import com.hashbee.user.domain.User;
import com.hashbee.user.model.UserVo;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component
public interface UserMapper {
	
	User getByPhonePwd(@Param("phone") String phone, @Param("password") String password);
	
	User getByPhone(@Param("phone") String phone);
	
	User getById(@Param("id") Integer id);

    List<User> getAllUsers();

    int deleteByPrimaryKey(@Param("id") Integer id, @Param("updated") String updated);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(@Param("id") Integer id, @Param("updated") String updated);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    
    int updateUserInfo(UserVo user);
    
    int updatePassword(UserVo user);
    
    int updatePhone(UserVo user);
    
    int updateImgurl(UserVo user);
}